


 cd "$data"
 use "dataset.dta", clear 
 
 * TABLE 1 - Do the policy preferences of voters and non-voters differ? 

eststo M1: regress selfplacement voted i.country_year_ if samplelimit==1, robust
margins, dydx(voted) post
estimates store e_selfplacement 

eststo M2: regress redistribution voted i.country_year_ if samplelimit==1, robust
margins, dydx(voted) post
estimates store e_redistribution

eststo M3: regress regulation voted i.country_year_ if samplelimit==1, robust
margins, dydx(voted) post
estimates store e_regulation

eststo M4: regress spending voted i.country_year_ if samplelimit==1, robust // only for 2014
margins, dydx(voted) post
estimates store e_spending

eststo M5: regress samesexmarriage voted i.country_year_ if samplelimit==1, robust
margins, dydx(voted) post
estimates store e_samesexmarriage

eststo M6: regress immigration voted i.country_year_ if samplelimit==1, robust
margins, dydx(voted) post
estimates store e_immigration

eststo M7: regress environment voted i.country_year_ if samplelimit==1, robust
margins, dydx(voted) post
estimates store e_environment

eststo M8: regress laworder voted i.country_year_ if samplelimit==1, robust
margins, dydx(voted) post
estimates store e_laworder

eststo M9: regress euintegration voted i.country_year_ if samplelimit==1, robust
margins, dydx(voted) post
estimates store e_euintegration

cd "$tables"

 esttab M1 M2 M3 M4 M5 M6 M7 M8 M9 using Table1.tex, replace ///
 b(3) se(2) ///
 collabels("left-right" "redistribution" "regulation" "spending" "same sex marriage" "immigration" "environment" "civil liberties" "EU integration") ///
 coeflabels(intercept "label of intercept") ///
 title("Regression Results") 

 